package com.ruoyi.wechat.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 微信推送对象 business_wechat
 *
 * @author ruoyi
 * @date 2022-08-29
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BusinessWechat extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 订阅号appId
     */
    @Excel(name = "订阅号appId")
    private String wechatAppId;
    /**
     * 订阅号secret
     */
    @Excel(name = "订阅号secret")
    private String wechatSecret;
    /**
     * 推送目标微信id
     */
    @Excel(name = "推送目标微信id")
    private String wechatOpenId;
    /**
     * 模板id
     */
    @Excel(name = "模板id")
    private String wechatTemplateId;
    /**
     * 模板内容
     */
    @Excel(name = "模板内容")
    private String wechatTemplateContent;
    /**
     * 百度天气 https://lbsyun.baidu.com/apiconsole/center#/home
     */
    @Excel(name = "百度天气 https://lbsyun.baidu.com/apiconsole/center#/home")
    private String ak;
    /**
     * 百度天气区域编码
     */
    @Excel(name = "百度天气区域编码")
    private String akDistrictId;
    /**
     * 天行彩虹屁 https://www.tianapi.com/apiview/181
     */
    @Excel(name = "天行彩虹屁 https://www.tianapi.com/apiview/181")
    private String tianapiAk;

    @Excel(name = "被推送人出生年月日")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date birthDay;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("wechatAppId", getWechatAppId())
                .append("wechatSecret", getWechatSecret())
                .append("wechatOpenId", getWechatOpenId())
                .append("wechatTemplateId", getWechatTemplateId())
                .append("wechatTemplateContent", getWechatTemplateContent())
                .append("ak", getAk())
                .append("akDistrictId", getAkDistrictId())
                .append("tianapiAk", getTianapiAk())
                .append("birthDay", getBirthDay())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("deleted", getDeleted())
                .toString();
    }
}
